package com.edu.service.impl;

import com.edu.bean.Incbalance;
import com.edu.mapper.IncbalanceMapper;
import com.edu.service.IncbalanceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author:GoodBoy
 * @DATE:2024/11/12 20:59
 * @describe:
 */
@Service
public class IncbalanceServiceImpl implements IncbalanceService {
    @Resource
    private IncbalanceMapper incbalanceMapper;

    @Override
    public int deleteByPrimaryKey(Integer IncbalanceId) {
        return incbalanceMapper.deleteByPrimaryKey(IncbalanceId);
    }

    @Override
    public int insert(Incbalance row) {
        return incbalanceMapper.insert(row);
    }

    @Override
    public Incbalance selectByPrimaryKey(Integer userId) {
        if(userId!=null&&userId!=0){
            return incbalanceMapper.selectByPrimaryKey(userId);
        }
        return null;
    }

    @Override
    public List<Incbalance> selectAll() {
        return incbalanceMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(Incbalance row) {
        return incbalanceMapper.updateByPrimaryKey(row);
    }
}
